import startDraw from "@/config/draw.config";
/**
 * 绘制数据匹配
 * @param data
 */
export const plotDataMatching = (data: any) => {
    let type = data.type;
    switch (type) {
        case "graphicText":
            /**
             * 图上文字
             */
            startDraw.graphicText.label(data.value);
            break;

        case "punctuation":
            /**
             * 图上标点
             */
            startDraw.punctuation.point();
            break;

        case "segment":
            /**
             * 图上线段
             */
            startDraw.segment[data.value]();
            break;

        case "twodimension":
            /**
             * 二维平面
             */
            startDraw.twodimension[data.value]();
            break;

        case "threedimensional":
            /**
             * 三维立体
             */
            startDraw.threedimensional[data.value]();
            break;

        default:
            alert("暂无此类型数据");
    }
};
